﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Library_Code.DAL;

namespace Library_Code.BIZ
{
    public class CTPN
    {
        CTPN_DAL dal = new CTPN_DAL();
         [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }
        public int IdSanPham { get; set; }
        public int IdPhieuNhap { get; set; }
        public int SoLuong { get; set; }
        public int GiaNhap { get; set; }
        public int GiaBanMoi { get; set; }
        public int ThanhTien { get; set; }

        public virtual SANPHAM SANPHAM { get; set; }
        public virtual PHIEUNHAP PHIEUNHAP { get; set; }
        //Phuong thuc
        public int ThemCTPN()
        {
            return dal.ThemCTPN(this);
        }
    }
}
